import { createRouter, createWebHistory } from 'vue-router'
import LayOut from '@/components/common/layout.vue'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      redirect: "/login",
    },
    {
      path: "/:pathMatch(.*)*",
      component: () => import('@/views/error/404.vue'),
      hidden: true
    }, 
    {
      path: '/login',
      component: () => import('@/views/login.vue'),
   
    },
    {
      path: '/',//统一路由放到一个下面
      component: LayOut,
      children: [
        {
          path: 'admin/user',
          component: () => import('@/views/user.vue'),
          name:'User'
        },
        {
          path: 'multiTime',
          component: () => import('@/views/multiTime/index.vue'),   
          name:'MultiTime'
        }, 
        {
          path: 'map',
          component: () => import('@/views/map.vue'),
          name:'Map'
        },
      ]
    }, 
 

  ],
})

export default router
